<p>myc01-todolist works!</p>
<h2>待办事项列表</h2>
<hr>
<input [(ngModel)]="userInput" type="text" placeholder="请输入...">
<button (click)="doAdd()">添加代办</button>
<p *ngIf="todoList.length == 0">尚无待办事项</p>
<ul>
  <li *ngFor=" let todo of todoList; index as i">
    {{i}}-->{{todo}}
    <button (click)="doDelete(i)">删除</button>
  </li>
</ul>
